<template>
	<view>
		<view class="uni-popup-share" v-show="isAlert==1">
			<view class="uni-share-title">
				<image class="uni-share-image-title" :src="icon1" mode="aspectFill"></image>
				<text class="uni-share-title-text"> 融创服务 | 归心社群</text>
				<text class="uni-share-title-text"> 申请</text>
			</view>
			<view class="uni-share-content">
				<view class="uni-share-content-box">
					<text class="uni-share-text">获取您的昵称、头像、地区及性别</text>
					<view class="uni-share-content-item">
						<image class="uni-share-image" :src="[avatarUrl]" mode="aspectFill"></image>
						<view class="uni-share-content-item-right">
							<text class="uni-share-text">{{nickName}}</text>
							<text class="uni-share-text">微信个人信息</text>
						</view>
					</view>
				</view>
			</view>
			<view class="uni-share-button-box">
				<button class="uni-share-button" @click="close">取消</button>
				<button class="uni-share-button" type="primary" open-type="openSetting" @opensetting="opensetting">允许</button>
			</view>
		</view>
		<view class="uni-popup-share" v-show="isAlert==2">
			<view class="uni-share-title">
				<image class="uni-share-image-title" :src="icon1" mode="aspectFill"></image>
				<text class="uni-share-title-text"> 融创服务 | 归心社群</text>
				<text class="uni-share-title-text"> 申请</text>
			</view>
			<view class="uni-share-content">
				<view class="uni-share-content-box">
					<text class="uni-share-text">获取您的手机号</text>
					<view class="uni-share-content-item">
						<image class="uni-share-image" :src="[avatarUrl]" mode="aspectFill"></image>
						<view class="uni-share-content-item-right">
							<text class="uni-share-text">{{nickName}}</text>
							<text class="uni-share-text">微信个人信息</text>
						</view>
					</view>
				</view>
			</view>
			<view class="uni-share-button-box">
				<button  open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber">下一步</button>
			</view>
		</view>
	</view>
</template>

<script>
	import http from '../../common/request.js';
	export default {
		name: 'UniPopupShare',
		props: {
			avatarUrl: {
				type: String,
				default: ''
			},
			nickName: {
				type: String,
				default: ''
			}
		},
		inject: ['popup'],
		data() {
			return {
				isAlert:1,
				dataList:{},
				icon1: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-2.png',
				icon2: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-8.png'
			}
		},
		created() {},
		methods: {
			/**
			 * 关闭窗口
			 */
			close() {
				this.popup.close()
			},
		}
	}
</script>
<style lang="scss" scoped>
	.uni-popup-share {
		background-color: #fff;
	}

	.uni-share-title {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		align-items: center;
		justify-content: left;
		height: 40px;
		padding-left: 10px;
	}

	.uni-share-title-text {
		font-size: 14px;
		color: #666;
	}

	.uni-share-content {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		justify-content: center;
		padding: 10px;
	}

	.uni-share-content-box {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		flex-wrap: wrap;
		width: 360px;
	}

	.uni-share-content-item {
		// width: 90px;
		/* #ifndef APP-NVUE */
		display: flex;
		flex: 1;
		/* #endif */
		flex-direction: row;
		justify-content: left;
		padding: 10px 0;
		align-items: center;
	}

	.uni-share-content-item:active {
		background-color: #f5f5f5;
	}
	.uni-share-image-title{
		width: 16px;
		height: 16px;
	}
	.uni-share-image {
		width: 30px;
		height: 30px;
	}

	.uni-share-content-item-right {
		
	}

	.uni-share-text {
		margin-top: 10px;
		font-size: 14px;
		color: #3B4144;
		width: 100%;
		display: block;
	}

	.uni-share-button-box {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		padding: 10px 15px;
	}

	.uni-share-button {
		flex: 1;
		border-radius: 4px;
		font-size: 16px;
		margin: 0 10px;
	}

	.uni-share-button::after {
		border-radius: 4px;
	}
</style>
